<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="{:U('orderFailIndex')}" method="post">
        <div class="bjui-searchBar">
                <label>条件搜索：</label>
                <div role="group" class="btn-group">
                    <select name="key" data-toggle="selectpicker">
                        <option value="order_sn" <?php echo I("key")=="order_sn" ? "selected='true'" : "";?>>网店单号</option>
                        <option value="order_no" <?php echo I("key")=="order_no" ? "selected='true'" : "";?>>系统单号</option>
                        <option value="user_name" <?php echo I("key")=="user_name" ? "selected='true'" : "";?>>姓名</option>
                        <option value="mobile_phone" <?php echo I("key")=="mobile_phone" ? "selected='true'" : "";?>>手机</option>
                        <option value="home_phone" <?php echo I("key")=="home_phone" ? "selected='true'" : "";?>>电话</option>
                        <option value="address" <?php echo I("key")=="address" ? "selected='true'" : "";?>>地址</option>
                        <option value="goods_sn" <?php echo I("key")=="goods_sn" ? "selected='true'" : "";?>>货号</option>
                        <option value="bar_code" <?php echo I("key")=="bar_code" ? "selected='true'" : "";?>>条码</option>
                        <option value="seller_note" <?php echo I("key")=="seller_note" ? "selected='true'" : "";?>>卖家备注</option>
                        <option value="message" <?php echo I("key")=="message" ? "selected='true'" : "";?>>买家留言</option>
                        <option value="check_message" <?php echo I("key")=="check_message" ? "selected='true'" : "";?>>审单备注</option>
						<option value="host_order_sn" <?php echo I("key")=="host_order_sn" ? "selected='true'" : "";?>>申请编号</option>
                    </select>
					<input type="text" name="value" class="form-control" size="20" value="{:I('value')}">
                </div>
                &nbsp;
				<label>标记失败时间：</label>
                <input type="text" data-toggle='datepicker' value="{$start_time}" name="start_time" class="form-control" size="15"  />
                -
                <input type="text" data-toggle='datepicker' value="{$end_time}" name="end_time" class="form-control" size="15" />
                <label>银行类型：</label>
                <div role="group" class="btn-group">
                    <select name="bank_id" data-toggle="selectpicker">
                        <option value="">全部</option>
                        <?php foreach($bankList as $bank):?>
                        <option value="{$bank.id}" <?php echo I("bank_id")==$bank['id'] ? "selected='true'" : "";?>>{$bank.name}</option>
                        <?php endforeach;?>
                    </select>
                </div>
                &nbsp;

                <label>失败原因：</label>
                <div role="group" class="btn-group">
                    <select name="fail_reason" data-toggle="selectpicker">
                        <option value="">全部</option>
                        <volist name="Think.config.FAIL_REASON" id="v">
                            <option value="{$v}" <?php echo $v==I('fail_reason') ? 'selected' : '';?>>{$v}</option>
                        </volist>
                    </select>
                </div>
                &nbsp;

                <button type="submit" class="btn-default" data-icon="search">查询</button>
                &nbsp;              
			 <div class="pull-right">
				<span><a href="{:U('outxls')}" class="btn btn-blue" data-toggle="doexport" data-confirm-msg="确定要导出吗？" data-icon="arrow-up" >导出</a></span>
			</div>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top">
        <thead>
            <tr data-idname="list[#index#][order_id]">
                <th data-order-field="order_no">订单号</th>
                <th data-order-field="操作者">操作者</th>
                <th data-order-field="order_sn">B2C网站订单号</th>
                <th data-order-field="user_name">顾客姓名</th>
                <th>订单状态</th>
                <th>失败原因</th>
                <th data-order-field="status_time">标记失败时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($list as $arr):?>
            <tr data-id="{$arr.order_id}">
                <!-- 订单号 -->
				<if condition="$arr.order_no neq ''">
                <td><a  data-toggle="navtab" data-options="{id:'Order{$arr['order_id']}', url:'{:U('order/detailsOrder?orderId='.$arr['order_id'].'&isAfterSale=1'.'&navTabId=Order'.$arr['order_id'])}', title:'{$arr.order_sn}-订单详细'}">{$arr.order_no}</a></td>
				<else />
				<td>未生成</td>
				</if>
                <!-- 操作者 -->
                <td>{$arr.operator}</td>
                <!-- B2C网站订单号 -->
                <td>{$arr.order_sn}</td>
                <!-- 顾客姓名 -->
                <td>{$arr.user_name}</td>
                <!-- 订单状态 -->
                <td>订单失败</td>
                <!-- 失败原因 -->
                <td>{$arr.fail_reason}</td>
                <!-- 标记失败时间 -->
                <td>{:date('Y-m-d H:i:s', $arr['status_time'])}</td>
                <!-- 操作 -->
                <td>暂无</td>
            </tr>
            <?php endforeach;?>
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>

        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="{$pageSize}">{$pageSize}</option>
                <option value="{$pageSize*3}">{$pageSize*3}</option>
                <option value="{$pageSize*6}">{$pageSize*6}</option>
                <option value="{$pageSize*12}">{$pageSize*12}</option>
                <option value="{$pageSize*15}">{$pageSize*15}</option>
            </select>
        </div>
        <span>&nbsp;条，共 {$total} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="{$total}" data-page-size="{$pageSize}"
         data-page-current="{$pageCurrent}"></div>
</div>